package com.mo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.List;

import lombok.Data;
import lombok.experimental.Accessors;

@TableName(value = "sys_menu")
@Data
@Accessors(chain = true)
public class Menu implements Serializable {
    /**
     * 菜单id
     */
    @TableId(type = IdType.AUTO)
    private Integer menuId;

    /**
     * 上级菜单id
     */
    private Integer parentId;

    /**
     * 上级菜单名称
     */
    private String parentTitle;

    /**
     * 菜单类型 0目录 1菜单 2按钮
     */
    private String type;

    /**
     * 菜单标题
     */
    private String title;

    /**
     * 路由名称
     */
    private String name;

    /**
     * 路由路径
     */
    private String path;

    /**
     * 组件路径
     */
    private String component;

    /**
     * 菜单图标
     */
    private String icon;

    /**
     * 菜单排序
     */
    private Integer orderNum;

    /**
     * 权限字段
     */
    private String permissionCode;

    /**
     * 菜单备注
     */
    private String remark;

    @TableField(exist = false)
    private List<Menu> children;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}